<?php include 'login/Restrito.php';?>
<script language="JavaScript" type="text/javascript">
   function mascaraCpf(campoCpf){
              var cpf = campoCpf.value;
              if (cpf.length == 3){
                  cpf = cpf + '.';
                  document.forms[0].cpfU.value = cpf;
      				return true;              
              }
              if (cpf.length == 7){
                  cpf = cpf + '.';
                  document.forms[0].cpfU.value = cpf;
                  return true;
              }
			  if (cpf.length == 11){
                  cpf = cpf + '-';
                  document.forms[0].cpfU.value = cpf;
                  return true;
              }
         }
	function caractereTelefone(campoTel){
              var telefone = campoTel.value;
              if (telefone.length == 3){
                  telefone = telefone + ')';
                  document.forms[0].fone.value = telefone;
      				return true;              
              }
              if (telefone.length == 8){
                  telefone = telefone + '-';
                  document.forms[0].fone.value = telefone;
                  return true;
              }
			  
         }
	function caractereData(campoData){
        var data = campoData.value;
        if (data.length == 2){
            data = data + '/';
            document.forms[0].datanasc.value = data;
				return true;              
        }
        if (data.length == 5){
            data = data + '/';
            document.forms[0].datanasc.value = data;
            return true;
        }
		  
   }
</script>
<div id="conteudo">
	
	<div align="center">
    
    <form action="funcionario/FuncionarioCadastrar.php" method="post">
    <h3 align="center">Cadastrar Funcionário</h3>
  	<hr color="#0066FF" size="3px">
    <br />
    <div align="center" style="min-height: 350px; width:auto">
      <table width="700" border="0" align="center">
      
      <tr>
            <td width="100" align="left"><div align="left">Nome</div></td>
            <td width="600"><input name="nome" type="text" size="60" /></td>
          </tr>
          <tr>
          	<td align="left">Sexo</td>
            <td><select name="sexo" >
                <option value="Masculino">Masculino</option>
                <option value="Feminino">Feminino</option>
            </td>
          </tr>
          <tr>
            <td align="left">Cargo</td>
            <td><input type="text" name="cargo" maxlength="50" size="50" /></td>
          </tr>
          <tr>
            <td align="left">Telefone</td>
            <td><input type="text" id="tel" name="fone" OnKeyUp="caractereTelefone(this);" maxlength="13" value="(" /><font size="2" color="#555"> Ex: (XX)0000-0000 </font> </td>
          </tr>
          <tr>
            <td align="left">CPF</td>
            <td><input type="text" id="cpf" name="cpfU" OnKeyUp="mascaraCpf(this);" maxlength="14"/><font size="2" color="#555"> Ex: 000.000.000-00 </font> </td>
          </tr>
          
          <tr>
            <td align="left">Data de Nascimento</td>
            <td><input name="datanasc" type="text" maxlength="10" id="data" OnKeyUp="caractereData(this);" /> <font size="2" color="#555"> Ex: 12/12/2012 </font> </td>
          </tr>
          
          <tr>
            <td align="left">&nbsp;</td>
            <td><input type="submit" value="Cadastrar" name="enviar" class="botao"/> </td>
          </tr>
        </table>
        </div>
      
    </form>
    
    </div>
</div>
